Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(typing): Resolve or ignore pyright-only warnings #3676

Merged
merged 9 commits into from
Nov 5, 2024

Conversation

dangotbanned
Copy link
Member

@dangotbanned dangotbanned commented Nov 5, 2024

Follow-up to #3585

Overview

  • Removes most of the directory/file-level ignores
  • Fixes some simpler warnings
  • Adds explicit ignore comments on remaining issues

See individual commit messages for additional context:

No user-facing changes

Previously wasn't defined in a way that is compatible with the protocol
`mypy` doesn't check this as nothing *was* annotated
- Uses standardised import checking/skipping
- Imports `InteractiveShell` from the module
- Replaces global scope with fixtures
Will look at fixing `mixins` after merging #3675
- `isinstance` check is unreachable and invalidates the `@overload` for `spec_to_mimebundle`
- Added note for the cause on remaining ignore
Some common themes:
- Testing with *known* invalid arguments
- Using `PluginRegistry.get()` without checking for `None`
- `SchemaBase.(to|from)_dict` ) allows more than just `dict`
Also adds a note for `alt.jupyter`, no plans to fix that
@dangotbanned dangotbanned marked this pull request as ready for review November 5, 2024 15:57
@dangotbanned dangotbanned enabled auto-merge (squash) November 5, 2024 15:57
@dangotbanned dangotbanned merged commit 085a6b6 into main Nov 5, 2024
26 checks passed
@dangotbanned dangotbanned deleted the fix-ignored-pyright branch November 5, 2024 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant